package chen.web.controller.forum.form;

import java.util.Date;

import chen.web.region.RegionRepository;

public class AccountInfoForm {

	private String signature;
	private String intro;
	private int sex;
	private String factory;
	private int province;
	private int city;
	private int residence;
	private String qq;
	private Date birthday;
	
	public String getSignature() {
		return signature;
	}
	public void setSignature(String signature) {
		this.signature = signature;
	}
	public String getIntro() {
		return intro;
	}
	public void setIntro(String intro) {
		this.intro = intro;
	}
	public int getSex() {
		return sex;
	}
	public void setSex(int sex) {
		this.sex = sex;
	}
	public String getFactory() {
		return factory;
	}
	public void setFactory(String factory) {
		this.factory = factory;
	}
	public int getProvince() {
		return province;
	}
	public void setProvince(int province) {
		if(RegionRepository.getProvince(province) == null){
			throw new RuntimeException("非法参数");
		}
		this.province = province;
	}
	public int getCity() {
		return city;
	}
	public void setCity(int city) {
		if(RegionRepository.getCity(city)== null){
			throw new RuntimeException("非法参数");
		}
		this.city = city;
	}
	public int getResidence() {
		return residence;
	}
	public void setResidence(int residence) {
		if(RegionRepository.getResidence(residence) == null){
			throw new RuntimeException("非法参数");
		}
		this.residence = residence;
	}
	public String getQq() {
		return qq;
	}
	public void setQq(String qq) {
		this.qq = qq;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
}
